package collections.predecessor;

import java.util.Vector;

/**
 * @Classname VectorDemo
 * @Description 看Vector源码，理解为一个线程安全的ArrayList
 * @Date 2025/1/8 23:19
 * @Author zhuzhenguo
 */
public class VectorDemo {

    public static void main(String[] args) {
        // 在方法上都加上synchronized的
        Vector<String> vector = new Vector<>();
        vector.add("test");
        System.out.println(vector.get(0));
    }

}
